package com.boot.project.core.model.system.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @description: 角色和资源的中间表
 * @author: tsing
 * @create: 2021-01-24 21:26
 */
@Data
@TableName("sys_role_resource")
@NoArgsConstructor
@AllArgsConstructor
public class RoleResource {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long roleId;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long resourceId;

    private Date createTime;
    private Date updateTime;

    public RoleResource(Long id, Long roleId, Long resourceId) {
        this.id = id;
        this.roleId = roleId;
        this.resourceId = resourceId;
    }
}
